<template>
	<el-container direction="vertical">
		<SearchForm :columns="formColumn" @search="search" @reset="search" />

		<el-main class="nopadding">
			<scTable ref="table" tableName="financeFundList" v-bind="list" row-key="id" stripe :vritualData="vritualData">
				<el-table-column type="selection" width="50"></el-table-column>
				<template #orderInfo="scope">
					<div style="padding: 5px 0;"
						:style="index !== scope.row.orderInfo.length - 1 ? 'border-bottom: 1px solid #cfcfcf;' : ''"
						v-for="(item, index) in scope.row.orderInfo" :key="index">
						{{ item.name }}：{{ item.number }}
					</div>
				</template>
			</scTable>
		</el-main>
	</el-container>
</template>
<script>
import SearchForm from "@/components/SearchForm/index.vue";
import { formColumn, column } from "./date";
export default {
	data() {
		return {
			formColumn,
			list: {
				apiObj: this.$API.student.apply,
				params: {},
				column,
			},
			vritualData: [
				{
					1: '2023-02-09 10:12:23',
					2: '大朗',
					4: 'TMS',
					5: '班课',
					6: '收入',
					7: '班级收入',
					8: '新缴',
					9: '11200',
					10: '支付宝',
					11: '陈大厨',
					orderInfo: [
						{
							name: '技术全能系列',
							number: "8800"
						},
						{
							name: '技术全能系列',
							number: "8800"
						},
					]
				},
				{
					1: '2023-02-09 10:12:23',
					2: '大朗',
					4: 'TMS',
					5: '班课',
					6: '收入',
					7: '班级收入',
					8: '新缴',
					9: '11200',
					10: '支付宝',
					11: '酒大仙',
					orderInfo: [
						{
							name: '技术全能系列',
							number: "7522"
						},
						{
							name: '技术全能系列',
							number: "8800"
						},
					]
				},
				{
					1: '2023-02-09 10:12:23',
					2: '大朗',
					4: 'TMS',
					5: '班课',
					6: '收入',
					7: '班级收入',
					8: '新缴',
					9: '12450',
					10: '支付宝',
					11: '扫把星',
					orderInfo: [
						{
							name: '技术全能系列',
							number: "7522"
						},
						{
							name: '技术全能系列',
							number: "9566"
						},
					]
				},
			]
		}

	},
	components: {
		SearchForm,
	},
	methods: {
		search(searchParams) {
			const params = Object.assign({}, this.list.params, searchParams);
			this.$refs.table.reload(params);
		},
	}
}
</script>
